package cn.shop.admin.service;

import cn.shop.base.MyPage;
import cn.shop.transcation.order.entity.Order;
import cn.shop.transcation.order.entity.OrderQueryReq;
import cn.shop.utils.enums.OrderStatus;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author jzw
 * @since 2021-11-30 09:47
 */
public interface OrderService extends IService<Order> {

	MyPage<Order> orderList(MyPage<Order> page, OrderQueryReq query);

	Map<String, Object> statistics(OrderQueryReq query);

	/**
	 * 退回订单
	 *
	 * @param ids 订单id
	 * @return
	 * @author jzw
	 * @since 2021/12/9 14:18
	 */
	boolean giveBack(List<Long> ids);

	/**
	 * 修改订单状态
	 *
	 * @param ids
	 * @param status
	 * @return
	 */
	boolean changeStatus(List<Long> ids, OrderStatus status);
}
